import javax.swing.*;
import java.awt.*;

/**
 * 提示当前行动者的类
 */
public class WhoTurn extends JLabel {
    /**
     * 你滴回合
     */
    String You = "你的回合";
    /**
     * 对方回合
     */
    String Rival = "对方回合";
    public static WhoTurn Instance = new WhoTurn();

    /**
     * 初始化
     */
    public void Init(){
        setVisible(true);
        setHorizontalAlignment(SwingConstants.CENTER);
        setBounds(80,720,250,180);
        Font font = new Font(null,Font.BOLD,25);
        setFont(font);
    }
    public void setVisable(boolean visable){
        this.setVisible(visable);
    }
    public void ChangeTextToRival(){
        RivalActionJlabel.setRActionVisible(false);
        setText(Rival);
        setForeground(Color.RED);
        repaint();
    }

    /**
     * 显示我的回合
     */
    public void ChangeTextToMe(){
        setText(You);
        setForeground(Color.blue);
        repaint();
    }

    /**
     * 显示我方胜利
     */
    public void YouWin(){
        setText("You Win win win");
        setForeground(Color.orange);
        repaint();
    }

    /**
     * 显示我方失败
     */
    public void YouLose(){
        setText("You Lose");
        setForeground(Color.red);
        repaint();
    }

    /**
     * 显示平局
     */
    public void Equal(){
        setText("平局");
        setForeground(Color.GREEN);
        repaint();
    }

}
